//
//  AboutController.m
//  SleepingElf
//
//  Created by karong on 2023/10/26.
//

#import "AboutController.h"

@interface AboutController ()
@property (weak, nonatomic) IBOutlet UILabel *versionLabel;
@property (weak, nonatomic) IBOutlet UILabel *displayNameLabel;
@end

@implementation AboutController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.displayNameLabel.text = [NSString stringWithFormat:@"%@", [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"]];
    self.versionLabel.text = [NSString stringWithFormat:@"V %@", [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]];
}

- (IBAction)userAgreementaAction:(id)sender {
    UIViewController * target = [[CTMediator sharedInstance]ct_showWebWithUrl:API_AGREEMENT_USER titleStr:WSLocalized(@"用户协议") showNav:YES closeHandle:^{}];
    [self.navigationController pushViewController:target animated:YES];
}

- (IBAction)privacyAgreementaAction:(id)sender {
    UIViewController * target = [[CTMediator sharedInstance]ct_showWebWithUrl:API_AGREEMENT_PRIVACY titleStr:WSLocalized(@"隐私政策") showNav:YES closeHandle:^{}];
    [self.navigationController pushViewController:target animated:YES];
}


@end
